FeatureModule

abstract class FeatureModule

This is the parent class of all extensions.

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val build: Int

The current version or build number of this extension.

Link copied to clipboard

Get the context in which this extension is running. The context is the mechanism by which the extension interfaces with the rest of the program.

Link copied to clipboard

A description of this extension, taken from the extension's metadata file

Link copied to clipboard

The full name of the extension; used to present the extension to the user.

Link copied to clipboard
open val iconImage: Image?

An icon image that represents this extension and can be used in a button bar. Note: this is no longer used

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected lateinit var moduleID: String
Link copied to clipboard

Gets the file from which the extension was loaded (will be null if there was no external file used).

Link copied to clipboard
open val vendor: String

The name of the person or entity that created this extension.

Link copied to clipboard
open val vendorURL: String

The URL of the person or entity that created this extension.

Functions

Link copied to clipboard
fun _cleanup()

This is called internally by moneydance to release special extension resources (e.g. classloader)

Link copied to clipboard
open fun cleanup()

This is called when a data set is closed, so that the extension can let go of any references that it may have to the data or the GUI. If there are any windows open, they should be closed, and any state information should be discarded. Subclasses should override this if they maintain any state, or can have open windows. Subclasses should also use this method to deregister any listeners to the data set. NOTE: Moneydance does NOT currently call this method - use unload() instead!

Link copied to clipboard

Return a list of contextual actions (javax.swing.Action) that the extension can perform on target objects which are given in the context parameter, along with references to the kind of context and the UI object. The default implementation of this method returns an empty list. If you override it, please ensure that it returns quickly so that the context menu appearance remains snappy.

Link copied to clipboard

Get the ID string for this extension. This is the unique string that identifies this extension, and is used to invoke it via a URI such as moneydance:moduleID:some-action

Link copied to clipboard
fun getModuleMetaData(): ModuleMetaData

Returns a new / cloned copy of the ModuleMetaData (or null)

Link copied to clipboard
abstract fun getName(): String

Get a descriptive name for this extension. Extensions must override to provide the extension's name. Extensions can call getModuleMetaData().getModuleName to retrieve a localized name from meta_info.dict using Locale language tag keys

Link copied to clipboard

Return the contents of a resource/file at the given path that has been bundled with the extension

Link copied to clipboard
fun getURI(): String
Link copied to clipboard
open fun handleEvent(appEvent: String)

Notifies the extension that the given application event has occurred. More information on events triggered by Moneydance will be available at a later date.

Link copied to clipboard
open fun init()

Initialize the extension. This is called just after the module is loaded. At this point the moneydance UI has already been loaded (but is not necessarily visible) and the data file may or may not have been loaded.

Link copied to clipboard
abstract fun invoke(uri: String)

This is called when an extension is invoked using a moneydance URI. Only the part of the URI after the extension identifier is included in the URI. For example, if the following URI is invoked: moneydance:module:taxman:show_summary:year=1999 then the invoke method of the "taxman" extension is called with the uri parameter set to: "show_summary:year=1999".

Link copied to clipboard
fun setup(context: FeatureModuleContext, moduleID: String, info: StreamTable, moduleFile: File?, cl: ClassLoader?, isVerified: Boolean)
Link copied to clipboard
Link copied to clipboard
fun toDebugString(simpleDebugInfo: Boolean): String
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun unload()

This is called when the extension is unloaded from the application. The implementation of this method should remove the extension as a listener from all parts of the application, and stop any threads that may have been started by the extension. Always use unload() as Moneydance does NOT currently call cleanup()